package com.york.subject.domain.convert;

import com.york.subject.domain.entity.SubjectCategoryBO;
import com.york.subject.infra.basic.entity.SubjectCategory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 拦截器，实现转换器功能，因为我们需要的是SubjectCategory对象，而该模块使用SubjectCategoryBO
 */
@Mapper
public interface SubjectCategoryConverter {

    // 返回实现接口的实例
    SubjectCategoryConverter INSTANCE = Mappers.getMapper(SubjectCategoryConverter.class);

    SubjectCategory convertBoToCategory(SubjectCategoryBO subjectCategoryBO);

    List<SubjectCategoryBO> convertBoToCategory(List<SubjectCategory> subjectCategoryList);
}
